package com.example.project.file;


import com.example.project.base.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping(value = "fileAction")
public class FileController {

    @Autowired
    private FileServerImpl fileServer;

    @RequestMapping(value = "/upload")
    public Object upload(HttpServletRequest request) throws Exception {
        return new ResultBean<>(fileServer.upload(request));
    }
}
